package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserCommMapper;
import com.ruoyi.system.domain.SysUserComm;
import com.ruoyi.system.service.ISysUserCommService;

/**
 * 用户和社区关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-29
 */
@Service
public class SysUserCommServiceImpl implements ISysUserCommService 
{
    @Autowired
    private SysUserCommMapper sysUserCommMapper;

    /**
     * 查询用户和社区关联
     * 
     * @param id 用户和社区关联ID
     * @return 用户和社区关联
     */
    @Override
    public SysUserComm selectSysUserCommById(Long id)
    {
        return sysUserCommMapper.selectSysUserCommById(id);
    }

    /**
     * 查询用户和社区关联列表
     * 
     * @param sysUserComm 用户和社区关联
     * @return 用户和社区关联
     */
    @Override
    public List<SysUserComm> selectSysUserCommList(SysUserComm sysUserComm)
    {
        return sysUserCommMapper.selectSysUserCommList(sysUserComm);
    }

    /**
     * 新增用户和社区关联
     * 
     * @param sysUserComm 用户和社区关联
     * @return 结果
     */
    @Override
    public int insertSysUserComm(SysUserComm sysUserComm)
    {
        return sysUserCommMapper.insertSysUserComm(sysUserComm);
    }

    /**
     * 修改用户和社区关联
     * 
     * @param sysUserComm 用户和社区关联
     * @return 结果
     */
    @Override
    public int updateSysUserComm(SysUserComm sysUserComm)
    {
        return sysUserCommMapper.updateSysUserComm(sysUserComm);
    }

    /**
     * 批量删除用户和社区关联
     * 
     * @param ids 需要删除的用户和社区关联ID
     * @return 结果
     */
    @Override
    public int deleteSysUserCommByIds(Long[] ids)
    {
        return sysUserCommMapper.deleteSysUserCommByIds(ids);
    }

    /**
     * 删除用户和社区关联信息
     * 
     * @param id 用户和社区关联ID
     * @return 结果
     */
    @Override
    public int deleteSysUserCommById(Long id)
    {
        return sysUserCommMapper.deleteSysUserCommById(id);
    }

    @Override
    public List<Integer> selectSysUserCommDistict(Long userid) {
        return sysUserCommMapper.selectSysUserCommDistict(userid);
    }

    @Override
    public List<SysUserComm> getCheckedComs(Long userid) {
        return sysUserCommMapper.getCheckedComs(userid);
    }

    @Override
    public List<SysUserComm> getUnregisterComs(Long userid) {
        return sysUserCommMapper.getUnregisterComs(userid);
    }
}
